<script setup>
import { defineOptions } from 'vue'
import { ref, reactive, onMounted, watch, computed } from 'vue'
import { ipc } from '@/utils/ipcRenderer'
import { ipcApiRoute } from '@/api'
import {
  Form,
  Input,
  Button,
  Select,
  Tabs,
  Card,
  Table,
  message,
  Drawer,
  Divider,
  Space,
  Tag,
  Dropdown,
  Menu,
  Tree,
  Modal,
  Tooltip,
  Radio,
  Switch,
  Collapse,
  Upload,
  Checkbox,
  Empty
} from 'ant-design-vue'
import { SaveOutlined, ShareAltOutlined, UploadOutlined, DeleteOutlined } from '@ant-design/icons-vue'

defineOptions({
  name: 'ApiService'
})

// 请求方法选项
const methodOptions = [
  { label: 'GET', value: 'GET' },
  { label: 'POST', value: 'POST' },
  { label: 'PUT', value: 'PUT' },
  { label: 'DELETE', value: 'DELETE' },
  { label: 'PATCH', value: 'PATCH' },
  { label: 'OPTIONS', value: 'OPTIONS' },
  { label: 'HEAD', value: 'HEAD' }
]

// 内容类型选项
const contentTypeOptions = [
  { label: 'JSON', value: 'application/json' },
  { label: 'Form URL Encoded', value: 'application/x-www-form-urlencoded' },
  { label: 'Text', value: 'text/plain' },
  { label: 'XML', value: 'application/xml' },
  { label: 'Form Data', value: 'multipart/form-data' }
]

// 表单实例
const formRef = ref()

// 请求表单
const requestForm = reactive({
  name: '',
  url: '',
  method: 'GET',
  headers: [],
  params: [],
  body: '',
  contentType: 'application/json',
  auth: {
    type: 'none',
    basic: {
      username: '',
      password: ''
    },
    bearer: {
      token: ''
    }
  }
})
</script>

<template>
  <div>
    API SERVICE
  </div>
</template>

<style scoped lang="scss"></style>
